﻿namespace UnityEditor
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using UnityEngine;

    internal sealed class AvatarUtility
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern Vector3 GetLimitSign(Avatar avatar, int index);
        public static Quaternion GetZYPostQ(Avatar avatar, int index, Quaternion parentQ, Quaternion q)
        {
            return INTERNAL_CALL_GetZYPostQ(avatar, index, ref parentQ, ref q);
        }

        public static Quaternion GetZYRoll(Avatar avatar, int index, Vector3 uvw)
        {
            return INTERNAL_CALL_GetZYRoll(avatar, index, ref uvw);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern void HumanGetColliderTransform(Avatar avatar, int index, TransformX boneX, out TransformX colliderX);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Quaternion INTERNAL_CALL_GetZYPostQ(Avatar avatar, int index, ref Quaternion parentQ, ref Quaternion q);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Quaternion INTERNAL_CALL_GetZYRoll(Avatar avatar, int index, ref Vector3 uvw);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern void SetHumanPose(Animator animator, float[] dof);
    }
}

